<?php
/**
 * Date: 2018/3/5
 * Time: 16:22
 * Author: zeronlee
 */
namespace App\Http\Controllers\Auth\Sso;

class Tool{
    /**
     * 获取13位毫秒
     * @return float
     */
    function getMillisecond() {
        list($s1, $s2) = explode(' ', microtime());
        return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);
    }
    /**
     * 转换标准json
     * @param $str
     * @return json
     */
    function toJson ($str){
        $json = json_decode(str_replace(["'"],['"'],$str));
        return $json;
    }
}